Skip to main content

Basic Credential Issuance Payload

This document explains the structure of the payload object used in credential issuance. It outlines its key components, role, and usage, providing a comprehensive understanding of how the payload object functions within the system.

Overview

The payload object contains the core details required for issuing credentials. It defines the schemas, attributes, and formats associated with the request. This modular design ensures flexibility and precision in data handling.

Structure

The payload object is defined by the following properties:

  1. schemaId

    • Type: string
    • Description: The unique identifier for the schema. This defines the structure of the credential or data being requested.
    • Required: Yes
  2. expirationDate

    • Type: string (ISO 8601 format)
    • Description: The optional expiration date for the credential or data request.
    • Example: 2024-07-15T13:45:30Z
  3. format

    • Type: string
    • Description: Specifies the format of the credential. Examples include W3C and sd-jwt.
    • Default: W3C
  4. attributes

    • Type: array
    • Description: An array of attributes objects, each representing a key-value pair to be included in the credential.

Attributes Object Structure

Each attributes object within the payload array has the following properties:

  1. key

    • Type: string
    • Description: The name of the attribute, corresponding to a field in the schema.
    • Required: Yes
  2. value

    • Type: any
    • Description: The value assigned to the key. This can be any data type based on the schema.
    • Required: No

Example Payload

Here is an example of a complete payload object:

{
"payload": {
"schemaId": "https://137.dev-one37.id/bc/public/schemas/com.one37id.email/1.0",
"expirationDate": "2024-12-31T23:59:59Z",
"format": "w3c",
"attributes": [
{
"key": "email",
"value": "user@example.com"
},
{
"key": "_namespace",
"value": "personal.contact.verifiedemail"
}
]
}
}

Explanation

  1. schemaId: Specifies the schema used for verifying the email attribute.
  2. expirationDate: Sets the expiration date for the data request.
  3. format: Indicates the format of the credential as w3c.
  4. attributes: Includes an array of key-value pairs defining the data points for the credential.

X

Graph View